<template>
  <view class="demo-container">
    <!-- 基础用法 -->
    <view class="demo-block">
      <view class="demo-block__title">基础用法</view>
      <view class="demo-block__content">
        <fu-avatar src="https://q1.qlogo.cn/g?b=qq&nk=1057072668&s=640" />
        <fu-avatar text="Fu" />
        <fu-avatar icon="&#xe6e3;" />
      </view>
    </view>
    
    <!-- 头像形状 -->
    <view class="demo-block">
      <view class="demo-block__title">头像形状</view>
      <view class="demo-block__content">
        <fu-avatar 
          src="https://q1.qlogo.cn/g?b=qq&nk=1057072668&s=640"
          shape="circle"
        />
        <fu-avatar 
          src="https://q1.qlogo.cn/g?b=qq&nk=1057072668&s=640"
          shape="square"
        />
      </view>
    </view>
    
    <!-- 头像尺寸 -->
    <view class="demo-block">
      <view class="demo-block__title">头像尺寸</view>
      <view class="demo-block__content">
        <fu-avatar 
          src="https://q1.qlogo.cn/g?b=qq&nk=1057072668&s=640"
          size="small"
        />
        <fu-avatar 
          src="https://q1.qlogo.cn/g?b=qq&nk=1057072668&s=640"
          size="medium"
        />
        <fu-avatar 
          src="https://q1.qlogo.cn/g?b=qq&nk=1057072668&s=640"
          size="large"
        />
        <fu-avatar 
          src="https://q1.qlogo.cn/g?b=qq&nk=1057072668&s=640"
          :custom-size="120"
        />
      </view>
    </view>
    
    <!-- 自定义样式 -->
    <view class="demo-block">
      <view class="demo-block__title">自定义样式</view>
      <view class="demo-block__content">
        <fu-avatar 
          text="Fu"
          bg-color="#2979ff"
          text-color="#fff"
        />
        <fu-avatar 
          icon="&#xe6e3;"
          bg-color="#ee0a24"
          text-color="#fff"
        />
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {}
  }
}
</script>

<style lang="scss" scoped>
.demo-container {
  padding: 20rpx;
}

.demo-block {
  margin-bottom: 30rpx;
  
  &__title {
    margin-bottom: 20rpx;
    font-size: var(--fu-font-size-lg);
    color: var(--fu-text-color);
  }
  
  &__content {
    background-color: #fff;
    border-radius: var(--fu-radius-base);
    padding: 30rpx;
    display: flex;
    align-items: center;
    gap: 30rpx;
  }
}
</style> 